package com.ir;

import com.sysdep.CodeGenerator;

public class Int extends Expr {
    String name;
    long value;

    public Int(String name, long value) {
        this.name = name;
        this.value = value;
    }

    public String getName() {
        return name;
    }

    public long getValue() {
        return value;
    }

    @Override
    public boolean accept(CodeGenerator cg) {
        return cg.visit(this);
    }

    @Override
    public String toString() {
        return value + "";
    }
    @Override
    public int getIntValue() {
        return (int) value;
    }
}
